GTK_FLAGS = `pkg-config --cflags gtk+-3.0`
GTK_LIBS = `pkg-config --libs gtk+-3.0`
OBJECTS = $(patsubst src/%.c, build/%.o, $(wildcard src/*.c))

run: build
	./gtk_example

clean:
	rm -f build/*.o gtk_example

build: $(OBJECTS)
	gcc $(GTK_LIBS) build/*.o -o gtk_example

build/builder.o: src/builder.c src/builder.h
	gcc -c $(GTK_FLAGS) src/builder.c -o build/builder.o

build/logic.o: src/logic.c src/logic.h
	gcc -c $(GTK_FLAGS) src/logic.c -o build/logic.o
	
build/main.o: src/main.c
	gcc -c $(GTK_FLAGS) src/main.c -o build/main.o
